import java.io.Console;

/**
 * @Author：xz
 * @Date：2023/7/10
 */
public class HelloJava {
    public static void main(String[] args) {
        String greeting = "\uD835\uDD46";
//        System.out.println(greeting);

        int cpCount = greeting.codePointCount(0, greeting.length());
//        System.out.println(cpCount);
//        System.out.println(greeting.length());

        int index = greeting.offsetByCodePoints(0, 0);
        int co = greeting.codePointAt(index);
//        System.out.println(co);

        String oldStr = "strstr";
        String newStr = "rsb";
        String string = oldStr.replace("s", newStr);
//        System.out.println(string);

//        Scanner in = new Scanner(System.in);
//        System.out.println("你的姓名？");
//        System.out.println(in.nextLine());

        Console cons = System.console();
        String username = cons.readLine("User name：");
        char[] passwd = cons.readPassword("Password：");
    }
}
